//
//  TumblrLikeMenu.h
//  TumblrLikeMenu
//
//  Created by Tu You on 12/16/13.
//  Copyright (c) 2013 Tu You. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "TumblrLikeMenuItem.h"

typedef void (^TumblrLikeMenuSelectBlock)(NSUInteger index);

@interface TumblrLikeMenu : UIView

@property (nonatomic, strong) NSMutableArray *submenus;
@property (nonatomic, copy) TumblrLikeMenuSelectBlock selectBlock;

- (id)initWithFrame:(CGRect)frame subMenus:(NSMutableArray *)menus;

- (id)initWithFrame:(CGRect)frame subMenus:(NSMutableArray *)menus tip:(NSString *)tip;
- (void)show;


/*
 eg:
 
 NSMutableArray *subMenus=[[NSMutableArray alloc] initWithCapacity:0];
 for(int i=0;i<[arrname count];i++){
 
 TumblrLikeMenuItem *menuItem = [[TumblrLikeMenuItem alloc] initWithImage:FILEIMAGENAEM([[arrname objectAtIndex:i] objectForKey:@"icon"])  highlightedImage:FILEIMAGENAEM([[arrname objectAtIndex:i] objectForKey:@"icon"]) text:[[arrname objectAtIndex:i] objectForKey:@"title"]];
 
 [subMenus addObject:menuItem];
 }
 
 TumblrLikeMenu *menu = [[TumblrLikeMenu alloc] initWithFrame:self.view.bounds
 subMenus:subMenus
 tip:@"取消"];
 menu.selectBlock = ^(NSUInteger index) {
 
 };
 [menu show];
 
 
 */
@end
